package com.nondo.dean.order.mapper;

import com.nondo.dean.common.mybatis.Table;
import com.nondo.dean.order.domain.OrderLog;
import com.nondo.dean.order.domain.OrderLogExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.session.RowBounds;
import org.apache.ibatis.type.JdbcType;

@Table("order_log")
@Mapper
public interface OrderLogMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table order_log
     *
     * @mbg.generated Thu May 31 17:31:52 CST 2018
     */
    @SelectProvider(type=OrderLogSqlProvider.class, method="countByExample")
    long countByExample(OrderLogExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table order_log
     *
     * @mbg.generated Thu May 31 17:31:52 CST 2018
     */
    @DeleteProvider(type=OrderLogSqlProvider.class, method="deleteByExample")
    int deleteByExample(OrderLogExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table order_log
     *
     * @mbg.generated Thu May 31 17:31:52 CST 2018
     */
    @Delete({
        "delete from order_log",
        "where id = #{id,jdbcType=INTEGER}"
    })
    int deleteByPrimaryKey(Integer id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table order_log
     *
     * @mbg.generated Thu May 31 17:31:52 CST 2018
     */
    @Insert({
        "insert into order_log (id, order_id, ",
        "order_code, platform_user_id, ",
        "type, description, ",
        "user_id, user_name, ",
        "create_by, create_date, ",
        "update_by, update_date, ",
        "remarks, del_flag)",
        "values (#{id,jdbcType=INTEGER}, #{orderId,jdbcType=INTEGER}, ",
        "#{orderCode,jdbcType=VARCHAR}, #{platformUserId,jdbcType=INTEGER}, ",
        "#{type,jdbcType=INTEGER}, #{description,jdbcType=VARCHAR}, ",
        "#{userId,jdbcType=INTEGER}, #{userName,jdbcType=VARCHAR}, ",
        "#{createBy,jdbcType=BIGINT}, #{createDate,jdbcType=TIMESTAMP}, ",
        "#{updateBy,jdbcType=BIGINT}, #{updateDate,jdbcType=TIMESTAMP}, ",
        "#{remarks,jdbcType=VARCHAR}, #{delFlag,jdbcType=CHAR})"
    })
    int insert(OrderLog record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table order_log
     *
     * @mbg.generated Thu May 31 17:31:52 CST 2018
     */
    @InsertProvider(type=OrderLogSqlProvider.class, method="insertSelective")
    int insertSelective(OrderLog record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table order_log
     *
     * @mbg.generated Thu May 31 17:31:52 CST 2018
     */
    @SelectProvider(type=OrderLogSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="id", property="id", jdbcType=JdbcType.INTEGER, id=true),
        @Result(column="order_id", property="orderId", jdbcType=JdbcType.INTEGER),
        @Result(column="order_code", property="orderCode", jdbcType=JdbcType.VARCHAR),
        @Result(column="platform_user_id", property="platformUserId", jdbcType=JdbcType.INTEGER),
        @Result(column="type", property="type", jdbcType=JdbcType.INTEGER),
        @Result(column="description", property="description", jdbcType=JdbcType.VARCHAR),
        @Result(column="user_id", property="userId", jdbcType=JdbcType.INTEGER),
        @Result(column="user_name", property="userName", jdbcType=JdbcType.VARCHAR),
        @Result(column="create_by", property="createBy", jdbcType=JdbcType.BIGINT),
        @Result(column="create_date", property="createDate", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="update_by", property="updateBy", jdbcType=JdbcType.BIGINT),
        @Result(column="update_date", property="updateDate", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="remarks", property="remarks", jdbcType=JdbcType.VARCHAR),
        @Result(column="del_flag", property="delFlag", jdbcType=JdbcType.CHAR)
    })
    List<OrderLog> selectByExampleWithRowbounds(OrderLogExample example, RowBounds rowBounds);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table order_log
     *
     * @mbg.generated Thu May 31 17:31:52 CST 2018
     */
    @SelectProvider(type=OrderLogSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="id", property="id", jdbcType=JdbcType.INTEGER, id=true),
        @Result(column="order_id", property="orderId", jdbcType=JdbcType.INTEGER),
        @Result(column="order_code", property="orderCode", jdbcType=JdbcType.VARCHAR),
        @Result(column="platform_user_id", property="platformUserId", jdbcType=JdbcType.INTEGER),
        @Result(column="type", property="type", jdbcType=JdbcType.INTEGER),
        @Result(column="description", property="description", jdbcType=JdbcType.VARCHAR),
        @Result(column="user_id", property="userId", jdbcType=JdbcType.INTEGER),
        @Result(column="user_name", property="userName", jdbcType=JdbcType.VARCHAR),
        @Result(column="create_by", property="createBy", jdbcType=JdbcType.BIGINT),
        @Result(column="create_date", property="createDate", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="update_by", property="updateBy", jdbcType=JdbcType.BIGINT),
        @Result(column="update_date", property="updateDate", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="remarks", property="remarks", jdbcType=JdbcType.VARCHAR),
        @Result(column="del_flag", property="delFlag", jdbcType=JdbcType.CHAR)
    })
    List<OrderLog> selectByExample(OrderLogExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table order_log
     *
     * @mbg.generated Thu May 31 17:31:52 CST 2018
     */
    @Select({
        "select",
        "id, order_id, order_code, platform_user_id, type, description, user_id, user_name, ",
        "create_by, create_date, update_by, update_date, remarks, del_flag",
        "from order_log",
        "where id = #{id,jdbcType=INTEGER}"
    })
    @Results({
        @Result(column="id", property="id", jdbcType=JdbcType.INTEGER, id=true),
        @Result(column="order_id", property="orderId", jdbcType=JdbcType.INTEGER),
        @Result(column="order_code", property="orderCode", jdbcType=JdbcType.VARCHAR),
        @Result(column="platform_user_id", property="platformUserId", jdbcType=JdbcType.INTEGER),
        @Result(column="type", property="type", jdbcType=JdbcType.INTEGER),
        @Result(column="description", property="description", jdbcType=JdbcType.VARCHAR),
        @Result(column="user_id", property="userId", jdbcType=JdbcType.INTEGER),
        @Result(column="user_name", property="userName", jdbcType=JdbcType.VARCHAR),
        @Result(column="create_by", property="createBy", jdbcType=JdbcType.BIGINT),
        @Result(column="create_date", property="createDate", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="update_by", property="updateBy", jdbcType=JdbcType.BIGINT),
        @Result(column="update_date", property="updateDate", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="remarks", property="remarks", jdbcType=JdbcType.VARCHAR),
        @Result(column="del_flag", property="delFlag", jdbcType=JdbcType.CHAR)
    })
    OrderLog selectByPrimaryKey(Integer id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table order_log
     *
     * @mbg.generated Thu May 31 17:31:52 CST 2018
     */
    @UpdateProvider(type=OrderLogSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") OrderLog record, @Param("example") OrderLogExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table order_log
     *
     * @mbg.generated Thu May 31 17:31:52 CST 2018
     */
    @UpdateProvider(type=OrderLogSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") OrderLog record, @Param("example") OrderLogExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table order_log
     *
     * @mbg.generated Thu May 31 17:31:52 CST 2018
     */
    @UpdateProvider(type=OrderLogSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(OrderLog record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table order_log
     *
     * @mbg.generated Thu May 31 17:31:52 CST 2018
     */
    @Update({
        "update order_log",
        "set order_id = #{orderId,jdbcType=INTEGER},",
          "order_code = #{orderCode,jdbcType=VARCHAR},",
          "platform_user_id = #{platformUserId,jdbcType=INTEGER},",
          "type = #{type,jdbcType=INTEGER},",
          "description = #{description,jdbcType=VARCHAR},",
          "user_id = #{userId,jdbcType=INTEGER},",
          "user_name = #{userName,jdbcType=VARCHAR},",
          "create_by = #{createBy,jdbcType=BIGINT},",
          "create_date = #{createDate,jdbcType=TIMESTAMP},",
          "update_by = #{updateBy,jdbcType=BIGINT},",
          "update_date = #{updateDate,jdbcType=TIMESTAMP},",
          "remarks = #{remarks,jdbcType=VARCHAR},",
          "del_flag = #{delFlag,jdbcType=CHAR}",
        "where id = #{id,jdbcType=INTEGER}"
    })
    int updateByPrimaryKey(OrderLog record);
}